﻿using System;
using System.Web.UI.WebControls;
using BLL.RF.ATETest;

public partial class ViewbyProduct_ViewUploadZTEData_ZTEDataDetailView : System.Web.UI.Page
{
    tb_DFL_Info tdi;
    tb_Param_DFL tpd;

    private int id
    {
        get { return int.Parse(ViewState["id"].ToString()); }
        set { ViewState["id"] = value; }
    }

    public ViewbyProduct_ViewUploadZTEData_ZTEDataDetailView()
    {
        tdi = new tb_DFL_Info();
        tpd = new tb_Param_DFL();
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request.QueryString["resultid"] != null)
            {
                id = int.Parse(Request.QueryString["resultid"]);
                BindtdiData();
                BindtpdData();
            }
        }
    }

    protected void BindtdiData()
    {
        this.GridView1.DataSource = tdi.tb_DFL_Info_GetbyID_withoutFilter(id);
        this.GridView1.DataBind();
    }

    protected void BindtpdData()
    {
        this.GridView2.DataSource = tpd.tb_Param_DFL_GetbyID_withoutFilter(id);
        this.GridView2.DataBind();
    }

    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GridView1.PageIndex = e.NewPageIndex;
        BindtdiData();
    }

    protected void GridView2_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GridView2.PageIndex = e.NewPageIndex;
        BindtpdData();
    }
}
